<div xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:nxh="http://nuxeo.org/nxweb/html"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:nxd="http://nuxeo.org/nxweb/document">

  <h3><h:outputText value="#{messages['label.search.saveSearch']}" /></h3>

  <h:form id="#{fancyboxFormId}">

    <div class="content">
      <p class="specification">
        <h:outputText value="#{messages['label.search.save.description']}" />
      </p>

      <h:inputText value="#{searchUIActions.savedSearchTitle}"
        placeholder="#{messages['label.search.save.placeholder']}"
        required="true" styleClass="savedSearchTitle" />
      <h:outputScript target="#{pageJsTarget}">
        jQuery('.savedSearchTitle').focus();jQuery('.savedSearchTitle').select();
      </h:outputScript>

    </div>

    <div class="buttonsGadget">
      <h:commandButton value="#{messages['command.save']}"
        action="#{searchUIActions.saveSearch()}"
        styleClass="button">
        <a4j:ajax execute="@form" oncomplete="jQuery.fancybox.close()"
          render="searchPanelLeft" />
      </h:commandButton>
      <h:commandButton value="#{messages['command.cancel']}"
        action="#{searchUIActions.cancelSaveSearch()}"
        styleClass="button">
        <f:ajax execute="@this" onevent="jQuery.fancybox.close" />
      </h:commandButton>
    </div>

  </h:form>

</div>
